package com.wewins.fota.bean.bo.excel.data;

import com.wewins.fota.bean.bo.excel.column.TimeColumn;
import com.wewins.fota.common.constant.FotaCode;
import com.wewins.fota.bean.bo.excel.DataSource;
import com.wewins.fota.bean.bo.excel.column.ExcelColumn;
import com.wewins.fota.bean.bo.excel.column.FotaLogStatusColumn;
import com.wewins.fota.bean.bo.excel.column.NumericColumn;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * commission for ytl
 */

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ExportFotaLog2 implements DataSource {
    @ExcelColumn(value = "IMEI", width = 14)
    private String imei;

    @ExcelColumn("产品名称")
    private String product;

    @ExcelColumn("当前版本")
    private String fromV;

    @ExcelColumn("目标版本")
    private String toV;

    @ExcelColumn(value = "用户IP", width = 15)
    private String userIp;

    @ExcelColumn(value = "安装状态", cellClazz = FotaLogStatusColumn.class)
    private FotaCode installStatus;  // equal downloadStatus in logic.

    @ExcelColumn(value = "失败次数", cellClazz = NumericColumn.class)
    private long failCount;  // install success: failCount = install success ? count - 1 : count

    @ExcelColumn(value = "记录时间", width = 19, cellClazz = TimeColumn.class)
    private long recordTime;
}
